module.exports = {
  ERRORS: {
    // 初始化错误
    ERR_WHEN_INIT_SDK: 'ERR_WHEN_INIT_SDK',
    ERR_INIT_SDK_LOST_CONFIG: 'ERR_INIT_SDK_LOST_CONFIG',
    ERR_WHEN_INIT_MYSQL: 'ERR_WHEN_INIT_MYSQL',

    // 腾讯云代小程序登录
    ERR_REQUEST_PARAM: 'ERR_REQUEST_PARAM',

    // 授权模板错误
    ERR_HEADER_MISSED: 'ERR_HEADER_MISSED',
    ERR_GET_SESSION_KEY: 'ERR_GET_SESSION_KEY',
    ERR_IN_DECRYPT_DATA: 'ERR_IN_DECRYPT_DATA',
    ERR_SKEY_INVALID: 'ERR_SKEY_INVALID',

    // COS 模块错误
    ERR_REQUEST_LOST_FIELD: 'ERR_REQUEST_LOST_FIELD',
    ERR_UNSUPPORT_FILE_TYPE: 'ERR_UNSUPPORT_FILE_TYPE',
    ERR_FILE_EXCEEDS_MAX_SIZE: 'ERR_FILE_EXCEEDS_MAX_SIZE',

    // 信道服务错误
    ERR_REMOTE_TUNNEL_SERVER_ERR: 'ERR_REMOTE_TUNNEL_SERVER_ERR',
    ERR_REMOTE_TUNNEL_SERVER_RESPONSE: 'ERR_REMOTE_TUNNEL_SERVER_RESPONSE',
    ERR_UNKNOWN_TUNNEL_ERROR: 'ERR_UNKNOWN_TUNNEL_ERROR',
    ERR_UNLOGIN: 'ERR_UNLOGIN',
    ERR_INVALID_RESPONSE: 'ERR_INVALID_RESPONSE',

    // 数据库错误
    DBERR: {
      ERR_WHEN_INSERT_TO_DB: 'ERR_WHEN_INSERT_TO_DB',
      ERR_NO_SKEY_ON_CALL_GETUSERINFOFUNCTION: 'ERR_NO_SKEY_ON_CALL_GETUSERINFOFUNCTION'
    }
  },

  LOGIN_STATE: {
    SUCCESS: 1, // 登陆成功
    FAILED: 0 // 登录失败
  }
}
